// src/components/Icon.jsx
import React from "react";
import { Icon as Iconify } from "@iconify/react";

// Icon组件封装
// name: 图标名称，比如 "mdi:account" 或 "ant-design:home-filled"
// size: 图标大小，默认16
// color: 图标颜色
const Icon = ({ name, size = 16, color = "#000", ...rest }) => {
  if (!name) return null;

  return (
    <Iconify icon={name} width={size} height={size} color={color} {...rest} />
  );
};

export default Icon;
